<template>
  <div id="app">
    <v-header ></v-header>
    <div class="body">
      <v-sidebar />
      <div class="bodyRight">
<!--        <v-tags/>-->
        <div class="return">
          <el-button type="primary" size="mini" class="indexBtn" @click="goBack('/')">首页</el-button>
        </div>
        <div class="content" style="display: flex; justify-content: space-between; align-items: center">
          <v-page/>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import vHeader from '@/components/Header.vue'
import vSidebar from '@/components/Sidebar.vue'
import vTages from '@/components/Tags.vue'
import vPage from '@/views/config/page.vue'
import {userInfo} from '@/api/user/userGroup'
export default {
  components: {
    vPage,
    vHeader,
    vSidebar,
    vTages
  },
  data () {
    return {}
  },
  computed: {
    tagsList () {
      return this.$store.state.tagsList.map(item => item.name)
    },
    collapse () {
      return this.$store.state.collapse
    }
  },
  created () {
    this.userInfo()
  },
  methods: {
    goBack (val) {
      this.$router.push(val)
    },
    userInfo () {
      userInfo().then((res) => {
        if (res.code === 0) {
          localStorage.setItem('userInfo', JSON.stringify(res.data))
        }
      })
    }
  }
}
</script>
<style lang="less" scoped>
.bodyRight {
  background: #e8ecef;
  .return {
    // margin-top: 10px;
    background-color: #ffffff;
    .indexBtn {
      margin: 2px 10px;
    }
  }
}
</style>
